<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Resultado reporte</title>
    </head>
    <body>
    <% //new ArrayList<List<Object>>(); %>
	<%!	List<List<Object>> reporte=new ArrayList<List<Object>>(); %>
 	<% reporte = ((List<List<Object>>)request.getAttribute("resultado"));%>
	<%!	List<String> titulos=new ArrayList<String>(); %>
 	<% titulos = ((List<String>)request.getAttribute("titulo"));%>
		
	 <table>
		<tr>
		<%	 for(String s:titulos){ %>				 
				<th><%= s.toString()%></th>
			 	<%}%>
		</tr>
 	<% for(List<Object> reporte2:reporte){ %>
		<tr>
		<%	 for(Object o2:reporte2){ %>				 
				<td><%= o2.toString()%></td>
			 	<%}%>
				</tr>
			<%}%>

	</table>
			
			<form name="repFormExcel" method="post" action="reportePedidoExcel.do">
			<input type="hidden" name="idreporte" value="${idreporte}" />
			<input type="button" value="DESCARGAR EXCEL" onclick="document.repFormExcel.submit();"/>
			</form>
			<form name="repFormCSV" method="post" action="reportePedidoCSV.do">
			<input type="hidden" name="idreporte" value="${idreporte}" />
			<input type="button" value="DESCARGAR CSV" onclick="document.repFormCSV.submit();"/> 
			</form>          
	
    </body>
</html>